about banner
What is Java Concurrency and Performance in Multi-core Hardware

Concurrency is a property of systems in which several computations are executing simultaneously, and potentially interacting with each other. Computations may be executing on multiple cores in the same chip, preemptively time-shared threads on the same processor or executed on physically separated processors.

Why is Java Concurrency vital for Enterprises

As more and more computers are built with multi-core processors, concurrency has become an vital topic in the field of computer science. Your coders need to master concurrency. If they do not, your system might break on your busiest day. The most important reason for most applications (Enterprise and real-time) to fail or underperform is improper design for concurrency. This is especially true as multi-core/processor becoming ubiquitous.

What we Do

With our root level knowledge and experience gained by imparting concurrency knowledge for over a decade on aspects like Java Memory Model, Concurrent Hashmap, Non-blocking hashmap, Link transfer queue, Concurrent skiplist map and all other facets we provide consulting on techniques for designing, implementing, and reasoning about multiprocessor algorithms, in particular highly concurrent data structures for multi core machines. This has enabled us in partnering with our clients for all their training and consulting needs on concurrency package.

  • Java Concurrency and Performance

  • JDK 5, 6, 7 which have features and classes to harness the power of the underlying hardware. If you are not using it, your system might break on the busiest day. This course takes a holistic view "Java Concurrency", building the base and then moving on to advanced topics like designing for multi-core/processor Environment and designing and using industrial strength Data Structures for concurrent environment.


  • JavaMemoryModel

  • A detailed understanding of how Java Memory behaves against the onslaught of modern hardware.


  • Fork and Join

  • Have you thought of running your loops in parallel? This helps you take advantage of your multi core processors.


  • JNonBlockingHashMap

  • How about a map which scales linearly for modifications as well as access.


  • ConcurrentHashMap

  • Lock Striped on modifications but linearly scaling access.


  • ConcurrentSkipListMap

  • A Scalable Concurrent Sorted map.


  • LinkedTransferQueue

  • An unbounded TransferQueue based on linked nodes.


Techniques for designing, implementing, and reasoning about multiprocessor algorithms, in particular highly concurrent data structures for multi core machines.

JVM Tuning

Designing, Tuning and, Optimization of JVM based applications. Most often tuning is not only a software job. It requires one to know the entire stack right down to the hardware and the tools with which one can pin point the real issue. Beside the usual profilers, the tools we specialize in are Perf, Systemtap, Dtrace, Solaris studio analyzer, JMH, JCStress etc. JVM performance is the performance of a compiled Java and/or dynamically compiled java program.
This depends on how optimally its particular tasks are managed by the host Java Virtual Machine (JVM), and how well the JVM takes advantage of the features of the hardware and OS in doing so. With our expertise on the memory architecture, Java code, Java API and JVM we offer consulting on ways to tune your application for better performance in production servers is possible with proper configuration of JVM parameters, particularly those related to memory usage and garbage collection.


We provide consulting on the Designing, Tuning and, Optimization of JVM based applications. Besides the usual profilers, the tools we specialize in are Perf, Systemtap, Dtrace, Solaris studio, JMH, JCStress etc.

Java Performance Tuning

Measuring and Tuning every aspect of Java and JVM. A wholistic view of performance tuning of Java application and the JVM.


JVM Architecture and Dynamic Compilation:

How to understand the JVM Architecture and its dynamic Compiler. Or understanding the JVM Architecture(Advanced JVM Architecure-Part1, Advanced JVM Architecure-Part2). Measuring and tuning various JVM and , JVM Compiler options(Monitoring JIT, Tuning Inlining,Viewing the machine code).


Java Memory and GC Tuning

The theory of garbage collection and the java memory architecture. Then moving on to measure the memory usage, leaks and finally, advance tune the GC for the JVM.


Class Loading Architecture

Define classloading architecture for your application or understand the classloading architecture of the application server. Also understand the technique of peer class loading with code samples.


NIO

Using NIO to boost and handle big volume IO.


Day 1 : Introduction to Profiling, Monitoring & Tuning
  • 1.What comes beforeTuning
    • What is profiling & monitoring
    • What tomonitor (GC,Threads, ObjectCreation/Memory Leaks, I/O, Methods, , CPU Usage, )
  • 2.How to Monitor
    • Profiling,Sampling
    • Profiling-JVMTI/PI,JVM
    • Byte CodeInstrumentation
    • Measuring theperformance
Garbage Collection
  • 1.Understanding Collectors
    • WhyGCmonitoringisimportant from performanceperspective
    • Tracing Collectors /MarkSweep
    • CopyCollectors
    • Understanding the pros and cons of Copy & MarkSweep
    • Understanding heap fragmentation & compaction
    • Understanding Generational Collector In HotSpot
    • Understanding Serial GC, ParallelGC & ConcurrentGC
  • 2.Monitoring
    • Monitoring heap expansion and contraction
    • Understand reasons for OOME
    • Monitoring GC frequency & time
    • AnalyzingtheGCloganddeducehowtousethe tuningparameters
      • -verbose:gc -Xloggc:log.gc-XX:, +PrintGCDetails -XX:, +PrintTenuringDistribution
      • Taking the GCtimestamps
      • Rotation of GCLogs (-XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=10, -XX:GCLogFileSize=30K)
  • 2.Tuning
    • Grosstuning
    • Sizing thegenerations
    • HowtosetupParallel&ConcurrentGC
    • G1CollectorandGCinJava1.8 (1.COE>>a0-java-performance>>G1GC)
Threads
  • 1.UnderstandingThreads
    • States
    • How it works on cores
    • Understanding Blocking
  • 2.Tuning
    • General Techniques to improve performance of Concurrency code
    • .COE>>a0-java-performance:A-0.2: Java Concurrency in Practice (JCP) : Threads-Performance&Scalability
    • 2.MonitoringThreads
    • What is thread monitoring and why is it needed
    • Debugging & Troubleshooting multi-threaded applications with example
    • Analyzing Thread Dumps(UsingVisualVM)
    • Testing Timing Multi Threaded code
    • UsingVolatile, AtomicVariables & Contended Locks
    • Using LockAPI-try Locketc to avoid deadlocks
    • Donotreinventthewheel-useSynchronizers likeSemaphores
    • CountDownLatch, CyclicBarrier,Exchanger
Day 2 : Memory
  • 1.Profiling & Monitoring
    • What is Memory Profiling & why is it needed
    • Heapo ccupancy
    • Understanding & Detecting Memory Leaks
    • UnderstandingtheconceptofShallowSizeand RetainedSize
    • Understanding Dominators
    • Using Eclipse MAT to detect memory leaks
Methods (CPU Profiling)
  • 1.CPUProfiling
    • What is CPU Profiling and why is it needed
    • Understanding Hotspots inthreads
    • Tools to get the hotspots
    • Understanding the hotspot-calltree
  • 2.Tuning
    • Parallelizing loops forperformance
    • Optimizing usage of Strings,
    • Optimizing hashCode for HashMaps
    • Tips onDB
Get in touch with us to know how we fine tuned our client's applications for quality outcome.